<?php

use yii\helpers\Url;
use yii\helpers\Html;
use website\helpers\Render;
use common\models\User;
use common\models\Message;

$this->addCrumbs('我的消息', 'user/message-list');
$this->title = '消息阅读';
?>
<style>
    #message-detail h3 {height:45px;line-height:45px;font-size:20px;}
    #message-detail p {margin-bottom:10px;height:35px;line-height:35px;font-size:12px;color:#999;}
</style>

<div class="contenter">
    <?= $this->render('/user/navigator', ['active' => 'message']) ?>

    <div id="user-contenter">
        <div class="box-shadow pb-20px" id="sub-contenter">
            <div class="data-title"><span class="h3"><?= $this->title ?></span></div>
            <div class="data-content" id="message-detail">
                <h3><?= $message->title ?></h3>
                <p>
                    <span><i class="icon-bell-alt"></i> <?= Render::text(Message::$typeSelector, $message->type, false) ?></span>
                    <span><i class="icon-time"></i> <?= date('Y-m-d H:i:s', $message->created_at) ?></span>
                </p>
                <div><?= $message->content ?></div>
            </div>
        </div>
    </div>
</div>